package com.code.base.sys.service;

import java.util.List;
import java.util.Date;
import java.util.Map;
import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.code.base.sys.persistence.SysUserRoleMapper;
import com.code.base.sys.pojo.SysUserRole;
import com.code.util.PrimaryKeyUtil;


@Service
public class SysUserRoleService {


	@Resource
	private SysUserRoleMapper sysUserRoleMapper;

	public Long getInsertId() {
		return PrimaryKeyUtil.generatePrimaryKey();
	}

	public SysUserRole getDataById(Long id) {
		return sysUserRoleMapper.getDataById(id);
	}

	public List<SysUserRole> getAllData() {
		return sysUserRoleMapper.getAllData();
	}

	public int getDataCountByCondition(SysUserRole entity) {
		return sysUserRoleMapper.getDataCountByCondition(entity);
	}

	public List<SysUserRole> getDataByCondition(SysUserRole entity) {
		return sysUserRoleMapper.getDataByCondition(entity);
	}

	public int getDataCountByLikeCondition(SysUserRole entity) {
		return sysUserRoleMapper.getDataCountByLikeCondition(entity);
	}

	public List<SysUserRole> getDataByLikeCondition(SysUserRole entity) {
		return sysUserRoleMapper.getDataByLikeCondition(entity);
	}

	public List<SysUserRole> getDataByIds(Long[] ids) {
		return sysUserRoleMapper.getDataByIds(ids);
	}

	public void insertData(SysUserRole entity) {
		sysUserRoleMapper.insertData(entity);
	}

	public void updateData(SysUserRole entity) {
		sysUserRoleMapper.updateData(entity);
	}

	public void updateDataByParam(Map<String, Object> map) {
		if (map.size() == 0)
			return;

		sysUserRoleMapper.updateDataByParam(map);
	}

	public void deleteDataByObject(SysUserRole entity) {
		sysUserRoleMapper.deleteDataByObject(entity);
	}

	public void deleteDataById(Long id) {
		sysUserRoleMapper.deleteDataById(id);
	}

	public void deleteDataByIds(Long[] ids) {
		sysUserRoleMapper.deleteDataByIds(ids);
	}

}
